home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / biz / swood / FW_Font.lha / FW_Font / FontLook-Auto.fwrexx.long < prev    next >
Text File  |  1997-08-07  |  8KB  |  289 lines

  1. /* Hiermit erhält man eine Übersicht über seine gesamten Zeichensätze*/
  2. /* © Heiko Schröder / 06.08.97 / Mail: age@thepentagon.com */
  3.  
  4. Address='FinalW'
  5. Options results
  6.  
  7. STATUS PORTNAME
  8. FW = result
  9. address = FW
  10.  
  11. SIGNAL ON BREAK_C
  12.  
  13. 'ShowMessage 2 0 "FontLook - Auto V2.80 - 06.08.97" "    Neu: Das Shareware-Paket" "Info im FontLook-Auto-Guide" ":-)" "Ok" "(-:"'
  14. 'ShowMessage 1 1 "A C H T U N G !" "Das Makro benötigt ein leeres Dokument." "Ihr jetziges Dokument wird gelöscht!" "Ja" "Abbruch" ""'
  15. if result=2 then call BREAK_C
  16. Cleardoc Force
  17.  
  18. 'ShowMessage 2 0 "Codes oder Layout" "" "" "Codes" "Layout" ""'
  19. cl=result
  20.  
  21. 'ShowMessage 2 0 "Wie soll die" "Bilschirmausgabe erfolgen?" "" "Normal" "Speed" ""'
  22. ba=result
  23.  
  24. /*----- REXXREQTOOLS -----*/
  25.  
  26. Temp="ram:fonts.info"
  27. if ~show('L',"rexxreqtools.library") then do
  28.    if ~addlib('rexxreqtools.library',0,-30,0) then do
  29.       'ShowMessage 1 1 "Fehler...." "Benötige RexxReqTools.library" " A B B R U C H ! !" "Okay" "" ""'
  30.       exit
  31.    end
  32. end
  33.  
  34. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Verzeichnis auswählen...",,"rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  35. if dir="" then do
  36.    'ShowMessage 1 1 "Kein Verzeichnis ausgewählt!" "   A B B R U C H ! !" "" "Okay" "" ""'
  37.    exit
  38. end
  39. dir=d2c(34)||dir||d2c(34)
  40. address command 'list ' dir || ' to=' Temp || ' files lformat "%s%s"'
  41.  
  42. If OPEN('file',Temp,"R") then
  43. If Seek("file",0,"E")=0 then do
  44.    'ShowMessage 1 1 "Verzeichnis ist leer" " A B B R U C H ! !" "" "Okay" "" ""'
  45.    address "REXX"
  46.    close("file")
  47.    EXIT
  48. end
  49.  
  50. address "REXX"
  51. close("file")
  52. address command 'sort ' Temp Temp
  53. OPEN('file',Temp, "R")
  54.  
  55. address(FW)
  56. 'ShowMessage 1 0 "Benötigen Sie Locher-Marken?" "" "" "Ja" "Nein" ""'
  57. lm=result
  58. 'ShowMessage 1 0 "Wie geht es weiter?" "" "" "Speichern" "Speichern & Drucken" "Drucken"'
  59. wgw=result
  60.  
  61. /*FensterMinimierung*/
  62. IF ba=2 THEN DO
  63.    status WINDOW
  64.    parse VAR result links oben breite hoehe minbreite minhoehe . /**/
  65.    sizewindow minbreite minhoehe /**/
  66. End
  67.  
  68.  
  69. /*----- Schleife bis alle Fonts ausgegeben worden sind -----*/
  70.  
  71. DO WHILE 1
  72.    FullFontName=ReadLn('file')
  73.     IF EOF('file') THEN do
  74.       address "REXX"
  75.       close('file')
  76.       call Ende
  77.    End
  78.  If (Lastpos(".info",FullFontName)=0 & Lastpos(".otag",FullFontName)=0 & Lastpos(".type",FullFontName)=0 & Lastpos(".afm",FullFontName)=0 & Lastpos(".lib",FullFontName)=0) then do
  79.  
  80.    GetDocItemPrefs Decimal
  81.    Punkt=Result
  82.    If Punkt="Comma" then DocItemPrefs Decimal Period
  83.  
  84.    TextTool
  85.    Font FullFontName
  86.    a=RC
  87.    If a=0 then do                  /* Kann FW den Font verarbeiten?*/
  88.       Type d2c(32)
  89.       BackSpace
  90.       status FontPath
  91.       FullFontName=result
  92.  
  93.       pos = max(index(FullFontName,':'),lastpos('/',FullFontName))
  94.       IF (pos~=0) THEN ShortFontName=RIGHT(FullFontName, LENGTH(FullFontName)-pos)
  95.       else ShortFontName=FullFontName
  96.  
  97.       IF ba=2 THEN View 20
  98.  
  99.       Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
  100.       SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  101.  
  102.       GraphicTool
  103.       LinePrefs LineWt .5
  104.       DrawLine 1 2 3.5 20 3.5
  105.       DrawLine 1 2 26 20 26
  106.  
  107.       If lm=1 then DrawLine 1 .5 14.85 1 14.85
  108.  
  109.       TextTool
  110.       If cl=1 then do
  111.  
  112.          Do i=0 to 13
  113.             SetTab i*1.3+0.8 Right
  114.          End
  115.  
  116.          NameFont="FWDocs/Codes-" || ShortFontName
  117.          Justify Center
  118.          Font Softsans
  119.          FontSize 18
  120.          Type ShortFontName; NewParagraph; NewParagraph /**/
  121.  
  122.          DO a=33 BY 14 FOR 16
  123.  
  124.             Font Softsans
  125.             FontSize 8
  126.             zeile = ""                       /**/
  127.             DO x = a TO a + 13 WHILE x < 256 /**/
  128.                zeile = zeile || d2c( 9 ) || x || d2c( 32 ) || d2c( x ) /**/
  129.             END
  130.  
  131.             If x = 256 then zeile = zeile || d2c( 9 ) /**/
  132.             Type zeile; NewParagraph /**/
  133.  
  134.             Font FullFontName /**/
  135.             FontSize 24
  136.             zeile = "" /**/
  137.             DO x = a TO a + 13 WHILE x < 256 /**/
  138.                zeile = zeile || d2c( 9 ) || d2c( x ) /**/
  139.             END
  140.  
  141.             If x = 256 then zeile = zeile || d2c( 9 ) /**/
  142.             Type zeile; NewParagraph /**/
  143.  
  144.          END
  145.  
  146.          FontSize 12
  147.          Type d2c(9); NewParagraph /**/
  148.          Font Softsans
  149.  
  150.          FontSize 8
  151.          Justify Right
  152.          Type Date(E)" - "FullFontName
  153.  
  154.       END
  155.  
  156.       If cl=2 then do
  157.  
  158.          Justify Center
  159.          NameFont="FWDocs/Layout-" || ShortFontName
  160.          Font Softsans
  161.          FontSize 18
  162.          Type ShortFontName; NewParagraph /**/
  163.  
  164.          Justify Left
  165.          Font FullFontName
  166.          FontSize 8
  167.          NewParagraph; Type "This is 8-point type - not easy to read!"; NewParagraph
  168.  
  169.          FontSize 9
  170.          Type "9-Point type is about the smallest readable size."; NewParagraph
  171.  
  172.          FontSize 10
  173.          Type "With 10-point type, we have a normal text size."; NewParagraph
  174.  
  175.          FontSize 12
  176.          Type "With some Fonts, 12-point type is easier to read."; NewParagraph
  177.  
  178.          FontSize 14
  179.          Type "14-point type is good for subheadings."; NewParagraph
  180.  
  181.          FontSize 16
  182.          Type "For larger subheadings, try 16-point type."; NewParagraph
  183.  
  184.          FontSize 18
  185.          Type "18-point type makes nice small headlines."; NewParagraph
  186.  
  187.          FontSize 24
  188.          Type "24-point type is for medium headlines."; NewParagraph
  189.  
  190.          FontSize 36
  191.          Type "36-point is for larger ones."; NewParagraph
  192.  
  193.          FontSize 48
  194.          Type "48-point almost shouts!"; NewParagraph
  195.  
  196.          FontSize 60
  197.          Type "60-point is huge!"; NewParagraph
  198.  
  199.          FontSize 12
  200.          Font SoftSans
  201.          Type d2c( 32 ); NewParagraph /**/
  202.          NewParagraph; Type "NORMAL"; NewParagraph /**/
  203.  
  204.          FontSize 10
  205.          Font FullFontName
  206.          Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; NewParagraph
  207.          Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?"; NewParagraph
  208.          Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"; NewParagraph; NewParagraph; NewParagraph
  209.  
  210.          FontSize 12
  211.          Font SoftSans
  212.          Type "ERWEITERTER SCHRIFTCODE"; NewParagraph
  213.  
  214.          FontSize 10
  215.          Font FullFontName
  216.          DO j = 128 BY 32 FOR 4 /* MiK */
  217.             Type XRange( d2c( j ), d2c( j + 31 ) ); NewParagraph /* MiK */
  218.          End
  219.          Status BodyTextHeight
  220.          th=result
  221.          FG=26.24-2.113-th
  222.          FG=Trunc(FG*8/0.34)
  223.          FontSize FG
  224.          Type d2c(9)
  225.          Font SoftSans
  226.          FontSize 8
  227.          NewParagraph
  228.          Justify Right
  229.          Type Date(E)" - "FullFontName
  230.       End
  231.  
  232.       Call VH
  233.  
  234.    /* Nur Speichern */
  235.       If wgw~=3 then 
  236.          Save NameFont
  237.  
  238.       /* Speichern+Drucken */
  239.       If wgw=2 then 
  240.          Print
  241.  
  242.       /* Nur Drucken */
  243.       If wgw=3 then
  244.          Print
  245.  
  246.       Cleardoc force
  247.    END
  248.    else do
  249.       Call VH
  250.       'ShowMessage 1 1 "FW kann diesen Font nicht anzeigen..." "Es ist kein FW typischer Font..." "" "Okay" "" ""'
  251.    end
  252.  end
  253. END
  254.  
  255. Ende:
  256.    Address(FW)
  257.    Call VH
  258.  
  259.    If cl=1 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Codes-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  260.    If cl=2 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Layout-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  261.    'ShowMessage 2 1 "© Heiko Schröder" "email: age@thepentagon.com" "http://yi.com/home/SchroederHeiko" "Oki" "Doki" ":-))"'
  262.    Call SH
  263.  
  264.    Address command "delete ram:fonts.info QUIET"
  265.  
  266.    EXIT
  267.  
  268. BREAK_C:
  269.    Call VH
  270.  
  271.    'ShowMessage 1 1 "Makro-Abbruch..." "" "" "Ich weiß..." "" ""'
  272.  
  273.    Call SH
  274.    address "REXX"
  275.    CLOSE("file")
  276.    Address command "delete ram:fonts.info QUIET"
  277.    EXIT
  278.  
  279. VH:
  280. If ba=2 then View
  281. Return
  282.  
  283. SH:
  284. If ba=2 then do
  285.    SizeWindow breite hoehe
  286.    If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  287. end
  288. Return
  289.